<?php
/**
 * 周舟 hzboye010@163.com
 * addby sublime snippets
 * 用户积分,经验记录表 model
 */
namespace Ucenter\Model;

use Think\Model;

class UserLogModel extends Model{
	//积分别名
	const SCORE = "萌币";
	//经验别名
	const EXP   = "经验";
	//支付比例 score*rate
	const RATE  = 1;

	//op_type,score,exp,...
	//op_type对应数据库
	//100+
	//注册								--done
	const REGISTER        = '101,20,2';
	//邀请注册						--done
	const REGISTER_INVITE = '102,40,4';
	//首次更新头像   			--done
	const FIRST_AVATAR    = '103,20,2';
	//首次更新收货地址		--done
	const FIRST_ADDRESS   = '104,50,5';
	//签到
	const SIGN            = '105,10,1';
	//200+
	//发帖
	const THREAD_ADD      = '201,50,5';
	//删帖
	const THREAD_DELETE   = '202,50,5';
	//收到回复
	const POST_ME         = '203,50,5';
	//回帖
	const POST_ADD        = '204,50,5';
	//删回复
	const POST_DELETE     = '205,50,5';
	//评论
	const COMMENT_ADD     = '206,10,1';
	// 删除评论
	const COMMENT_DELETE  = '207,10,1';

	//300+
	//积分兑换
	const EXCHANGE_SGOODS = '301';

	protected $trueTableName = 'itboye_user_log';
	protected $_auto = array(
		array('time','time',1,'function')
	);

}